package day04.ZuoYeDemo;
// 3. 利用循环语句while计算数字1到100的和，并输出
public class KzDemo {
    public static void main(String[] args) {
        int num = 0;
        int a = 1;
        while (a<=100){
            num += a;
            a++;
        }
        System.out.println("1+2+3...+100 ="+num);
    }
}
